package cn.wolfcode.rbac.mapper;

import cn.wolfcode.rbac.domain.Role;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Role record);

    Role selectByPrimaryKey(Long id);

    List<Role> selectAll();

    int updateByPrimaryKey(Role record);

    List<Long> selectEmployeeIdByRoleId(Long roleId);

    List<Role> selectRoleByEmployeeId(Long id);

    int insertRoleIdAndEmployeeId(@Param("employeeId") Long employeeId,@Param("roleIdList") List<Long> roleIdList);

    int deleteRoleIdByEmployeeId(Long employeeId);
}